<template>
   <div @click="fatherFn" >
     <button @click.stop="btn1" >阻值事件冒泡</button>
     <a @click.prevent.stop href="http://www.taobao.com">去购物</a>
     <button @click.once="btn2" >程序运行期间只触发一次函数</button>
   </div>
</template>

<script>
export default {

  methods: {
    fatherFn(){
      console.log("父级事件被触发");
    },
    btn1(){

    },
    btn2(){
      console.log("只触发一次按钮");
    }
  }
}
</script>

<style scoped>
</style>
